<template>
  <div class="step-nlbp">
    <div style="color:blue">&lt;routes xmlns="http://camel.apache.org/schema/spring"&gt;</div>
    <div style="color:blue;padding-left: 16px;">&lt;route id="${能力编码}"&gt;</div>
    <el-input
      type="textarea"
      :rows="20"
      placeholder="请输入内容"
      v-model="fbOptions.flow.serviceTextArea"
      :disabled="disabled"
      style="padding-left: 32px;">
    </el-input>
    <div style="color:blue;padding-left: 16px;">&lt;/route&gt;</div>
    <div style="color:blue">&lt;/routes&gt;</div>
    <div style="color:red">备注：路由文件中&amp;符号需要转义为&amp;amp;</div>
  </div>
</template>

<script>
import {getExpertDsl} from "@slc/api/slc/inventory";

export default {
  props: {
    fbOptions: {
      type: Object,
      default: () => {
      }
    },
    disabled: {
      type: Boolean,
      default: false
    },
  },
  computed: {},
  mounted() {
    this.handleDefaultShow();
  },
  activated() {
    this.handleDefaultShow();
  },
  methods: {
    // 初始化内容
    async handleDefaultShow() {
      const res = await getExpertDsl({serviceVerId: this.fbOptions.formData.serviceVerId});
      // console.log(res);
      if (res.code === "200") {
        // console.log(res);
        this.fbOptions.flow.serviceTextArea = res.data ? res.data.contentText : '';
      }
      this.fbOptions.flow.currentShape = "custom-start";
    }
  },
};
</script>

<style lang="scss" scoped>
.step-nlbp {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  height: 100%;
}

:deep(.el-input--medium .el-input__inner) {
  height: 100% !important;
}
</style>
